﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                                        xmlns:entity="clr-namespace:for7raid.vk"
                    xmlns:local="clr-namespace:for7raid.vkGroupExplorer">
    <DataTemplate x:Key="UserItemTemplate" DataType="entity:User">
        <Grid Margin="3" Height="68">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="*" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Image Margin="3" Source="{Binding Path=Photo}" Grid.RowSpan="3"/>
            <TextBlock Grid.Column="1" Margin="3" Text="{Binding Path=FullName}" FontWeight="Bold"/>
            <StackPanel Grid.Column="1" Grid.Row="1" Margin="3" Orientation="Horizontal">
                <TextBlock Text="{Binding Education, StringFormat={}{0}\, }"/>
                <TextBlock>
                    <TextBlock.Text>
                         <MultiBinding StringFormat="{}{0}, ">
                                <Binding Path="DataContext.Cities" RelativeSource="{RelativeSource AncestorType=Window}" />
                                <Binding Path="City"/>
                                <MultiBinding.Converter>
                                    <local:CityConverter />
                                </MultiBinding.Converter>
                            </MultiBinding>
                    </TextBlock.Text>
                </TextBlock>
                <TextBlock Text="{Binding Birthdate}"/>
            </StackPanel>
            <TextBlock Grid.Column="1" Grid.Row="2" Margin="3" Foreground="Blue">
                <Hyperlink NavigateUri="{Binding Uri}" Command="local:MainWindowViewModel.GotoUriCommand" CommandParameter="{Binding Uri}">
                    <TextBlock Text="Перейти на страницу"/>
                </Hyperlink>
            </TextBlock>
            

        </Grid>
    </DataTemplate>
</ResourceDictionary>